package com.mercury.ec.framework.air.core.client.dto.search.detr;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

import static com.mercury.ec.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

/**
 * DETR Response DTO
 *
 * @author hesx
 */
@Schema(description = "管理后台 - DETR Response DTO")
@Data
@ToString(callSuper = true)
public class AirDetrRespDTO {

    @Schema(description = "出票代码", example = "479")
    private String airlineIssueNo;

    @Schema(description = "票号", example = "123456789")
    private String ticketNo;

    @Schema(description = "改签出票代码", example = "479")
    private String changeAirlineIssueNo;

    @Schema(description = "改签票号", example = "123456789")
    private String changeTicketNo;

    @Schema(description = "终止票号", example = "3")
    private String ticketLastNo;

    @Schema(description = "乘客姓名", example = "张三")
    private String name;

    @Schema(description = "证件号码", example = "123456789")
    private String cardNo;

    @Schema(description = "行程单号", example = "123456789")
    private String invoiceNo;

//    @Schema(description = "退票状态 字典（air_order_return_status 0-未退票，1-部分退票，2-已退票）", example = "2")
//    private Integer returnStatus;

    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @Schema(description = "出票日期", example = "2022-01-01")
    private LocalDate issueDate;

    @Schema(description = "出票office", example = "SZX540")
    private String issueOffice;

    @Schema(description = "票面价", example = "100.00")
    private BigDecimal ticketPrice;

    @Schema(description = "机建税", example = "10.00")
    private BigDecimal airportTax;

    @Schema(description = "燃油税", example = "10.00")
    private BigDecimal oilTax;

    @Schema(description = "总金额", example = "10.00")
    private BigDecimal amount;

    @Schema(description = "客票类型", example = "ET")
    private String type;

    @Schema(description = "票证类型 字典（basic_air_ticket_type 1-BSP/2-B2B/3-B2C/4-本票/5-外购）", example = "1")
    private Integer ticketType;

    @Schema(description = "pnr", example = "HSD89S")
    private String pnr;

    @Schema(description = "航司编码", example = "HSD89S")
    private String bigPnr;

    @Schema(description = "客票状态", example = "OPEN FOR USE")
    private String ticketStatus;

    @Schema(description = "打票机号", example = "1")
    private String ticketVendingMachineNo;

    @Schema(description = "DETR原文")
    private String detrContent;

    @Schema(description = "航段列表")
    private List<AirDetrRouteRespDTO> routes;
}
